package com.bsb.base.common.util;

import org.apache.log4j.Logger;

import it.sauronsoftware.jave.EncoderProgressListener;
import it.sauronsoftware.jave.MultimediaInfo;

public class ChangeAudioListener implements EncoderProgressListener{
	
	private static final Logger log = Logger.getLogger(ChangeAudioListener.class);
		
	private MultimediaInfo mediaInfo;
	private long speed;
	private String msg;
	
		@Override
		public void message(String arg0) {
			log.info("转码通知："+arg0);
			this.msg = arg0;
		}

		@Override
		public void progress(int arg0) {
			log.info("转码进度："+arg0);
			this.speed = arg0;
		}

		@Override
		public void sourceInfo(MultimediaInfo arg0) {
			if(null != arg0){
				log.info("文件信息"+arg0.toString());
				this.mediaInfo = arg0;
			}
		}

		public MultimediaInfo getMediaInfo() {
			return mediaInfo;
		}

		public void setMediaInfo(MultimediaInfo mediaInfo) {
			this.mediaInfo = mediaInfo;
		}

		

		public long getSpeed() {
			return speed;
		}

		public void setSpeed(long speed) {
			this.speed = speed;
		}

		public String getMsg() {
			return msg;
		}

		public void setMsg(String msg) {
			this.msg = msg;
		}
		
		
    	
    }